home *** CD-ROM | disk | FTP | other *** search
- This directory contains an example of using Adhesive from C and from BASIC
- assembler.
-
- The examples are supplied with source code, object code and executable code.
-
- Note if you recompile the objects you will need to copy the objects into
- the 'objects' directory replacing the old ones.
-
- Remember to choose the 'object' option for CAHG and 'module' option for Link.
- (Don't choose the module option for CC)
-
- Contents:
- readme this file
- install install the objects
- remove opposite of install, do this when you have finished
- objects directory containing objects ready for installation
- obj2 source code for object 2 (DDE C)
- obj3 source code for object 3 (BASIC)
- CUser user program (DDE C)
-
-
- How the examples work
- =====================
-
- Obj3
- ~~~~
- This is a simple object written in BASIC assembler. It consists of one function
- to reverse a string given a pointer to the string and the length of the string.
-
- Because this is written in BASIC assembler we have to set up the Adhesive
- object header ourselves. This is fairly simple however.
-
- Note the the function to reverse the string is compatible with an APCS
- caller.
-
-
- Obj2
- ~~~~
- This object is written in C. The 'cahg.adh' file describes what objects
- Obj2 requires and what procedure it has to offer. Note not all of the
- Shared C Library procedures are actually required at present.
-
- This object uses C's strlen() and Obj2 to implement a function which
- reverses a string without having to be told the length of it.
-
- Don't forget to use the 'object' option in CAHG and the 'module' option in
- link when compiling. (Do not choose the 'module' option in CC.)
-
- CUser
- ~~~~~
- This user is written in C.
-
- Again the 'cahg.need' file describes what objects the user requres.
- We only request Obj2 (Obj3 will be automatically loaded by Adhesive).
-
- Because the cahg file is called 'need' a label called cahg_need_ObjectsNeeded
- is defined by cahg. This is passed to adhesive_Request(). Note you
- require to link with the file 'tools.o.Adhesive'.
-
- Note the way an atexit() handler is used to ensure that the user always
- deregisters with Adhesive even if the program exits abnormally.
-
-
-
- Final note
- ==========
- If you have questions on these examples or using Adhesive or programming
- assembler which is APCS conformant please do not hesitate to contact me,
- it is best (and cheapest for me) if you do this by email. The file 'readme1st'
- explains how to get in contact with me.
-